<?php

Route::group(['namespace' => 'Admin'], function () {
    Route::any('/','AuthController@login')->name('admin.auth.login');//登录
    Route::group(['prefix' => 'auth'], function(){
        Route::get('logout','AuthController@logout')->name('admin.auth.logout');//退出
        Route::get('captcha','AuthController@captcha')->name('admin.auth.captcha');//验证码
    });
    //登录权限
    Route::group(['middleware' => ['auth:admin','manage.menu','manage.access']], function(){
        //首页
        Route::get('/main','IndexController@index')->name('admin.index.index');//登录
        Route::get('/agencys','IndexController@agencys')->name('admin.index.agencys');//代办
        Route::post('/agencysstatus','IndexController@AgencysStatus')->name('admin.index.AgencysStatus');//代办状态修改
        //管理员
        Route::group(['prefix' => 'manage'], function(){
            Route::get ('/','ManageController@index')->name('admin.manage.index');//首页
            Route::get ('/list','ManageController@list')->name('admin.manage.list');//列表
            Route::post('/update', 'ManageController@update')->name('admin.manage.update');//更新
            Route::post('/destroy', 'ManageController@destroy')->name('admin.manage.destroy');//删除
            Route::post('/lock', 'ManageController@lock')->name('admin.manage.lock');//锁定
            Route::post('/active', 'ManageController@active')->name('admin.manage.active');//激活
        });
        //角色
        Route::group(['prefix' => 'role'], function(){
            Route::get ('/','RoleController@index')->name('admin.role.index');//首页
            Route::get ('/list','RoleController@list')->name('admin.role.list');//列表
            Route::post('/update', 'RoleController@update')->name('admin.role.update');//更新
            Route::post('/destroy', 'RoleController@destroy')->name('admin.role.destroy');//删除
            Route::post('/lock', 'RoleController@lock')->name('admin.role.lock');//锁定
            Route::post('/active', 'RoleController@active')->name('admin.role.active');//激活
            Route::get ('/access', 'RoleController@access')->name('admin.role.access');//授权
            Route::post('/store', 'RoleController@store')->name('admin.role.store');//授权更新
        });

        //用户
        Route::group(['prefix' => 'user'], function(){
            Route::get ('/hrindex','UserController@hrIndex')->name('admin.user.hrIndex');//HR页面
            Route::get ('/supplierindex','UserController@supplierIndex')->name('admin.user.supplierIndex');//供应商页面
            Route::get ('/list','UserController@list')->name('admin.user.list');//列表
            Route::get ('/hredit','UserController@hrEdit')->name('admin.user.hrEdit');//详情
            Route::get ('/supplieredit','UserController@supplierEdit')->name('admin.user.supplierEdit');//详情
            Route::post('/update', 'UserController@update')->name('admin.user.update');//更新
            Route::post('/destroy', 'UserController@destroy')->name('admin.user.destroy');//删除
            Route::post('/lock', 'UserController@lock')->name('admin.user.lock');//拒绝
            Route::post('/active', 'UserController@active')->name('admin.user.active');//激活
            Route::post('/close', 'UserController@close')->name('admin.user.close');//锁定
            Route::get('/hrexports', 'UserController@hrExports')->name('admin.user.hrExports');//HRExcel导出
            Route::get('/supplierexports', 'UserController@supplierExports')->name('admin.user.supplierExports');//供应商Excel导出
        });

        //网站配置
        Route::group(['prefix' => 'config'], function(){
            Route::get ('/','ConfigController@index')->name('admin.config.index');//首页
            Route::post('/update', 'ConfigController@update')->name('admin.config.update');//更新
        });
        //顶部导航
        Route::group(['prefix' => 'navbar'], function(){
            Route::get ('/','NavbarController@index')->name('admin.navbar.index');//首页
            Route::get ('/list','NavbarController@list')->name('admin.navbar.list');//列表
            Route::post('/update', 'NavbarController@update')->name('admin.navbar.update');//更新
            Route::post('/destroy', 'NavbarController@destroy')->name('admin.navbar.destroy');//删除
        });
        //底部导航
        Route::group(['prefix' => 'bottom-navbar'], function(){
            Route::get ('/','BottomNavbarsController@index')->name('admin.bnav.index');//首页
            Route::get ('/list','BottomNavbarsController@list')->name('admin.bnav.list');//列表
            Route::post('/update', 'BottomNavbarsController@update')->name('admin.bnav.update');//更新
            Route::post('/destroy', 'BottomNavbarsController@destroy')->name('admin.bnav.destroy');//删除
        });
        //城市管理
        Route::group(['prefix' => 'areas'], function(){
            Route::get ('/','AreasController@index')->name('admin.areas.index');//首页
            Route::get ('/list','AreasController@list')->name('admin.areas.list');//列表
            Route::post('/update', 'AreasController@update')->name('admin.areas.update');//更新
            Route::post('/destroy', 'AreasController@destroy')->name('admin.areas.destroy');//删除
        });
        //类目
        Route::group(['prefix' => 'category'], function(){
            Route::get ('/','CategoryController@index')->name('admin.category.index');//首页
            Route::get ('/list','CategoryController@list')->name('admin.category.list');//列表
            Route::post('/update', 'CategoryController@update')->name('admin.category.update');//更新
            Route::post('/destroy', 'CategoryController@destroy')->name('admin.category.destroy');//删除
        });
        //广告位
        Route::group(['prefix' => 'adsense'], function(){
            Route::get ('/','AdsenseController@index')->name('admin.adsense.index');//首页
            Route::get ('/list','AdsenseController@list')->name('admin.adsense.list');//列表
            Route::post('/update', 'AdsenseController@update')->name('admin.adsense.update');//更新
            Route::post('/destroy', 'AdsenseController@destroy')->name('admin.adsense.destroy');//删除
        });
        //广告
        Route::group(['prefix' => 'ad'], function(){
            Route::get ('/','AdController@index')->name('admin.ad.index');//首页
            Route::get ('/list','AdController@list')->name('admin.ad.list');//列表
            Route::post('/update', 'AdController@update')->name('admin.ad.update');//更新
            Route::post('/destroy', 'AdController@destroy')->name('admin.ad.destroy');//删除
            Route::post('/lock', 'AdController@lock')->name('admin.ad.lock');//锁定
            Route::post('/active', 'AdController@active')->name('admin.ad.active');//激活
        });
        //投诉建议
        Route::group(['prefix' => 'feedback'], function(){
            Route::get ('/','FeedbackController@index')->name('admin.feedback.index');//首页
            Route::get ('/list','FeedbackController@list')->name('admin.feedback.list');//列表
            Route::get ('/edit','FeedbackController@edit')->name('admin.feedback.edit');//编辑（详情）
            Route::post('/update', 'FeedbackController@update')->name('admin.feedback.update');//更新
            Route::post('/destroy', 'FeedbackController@destroy')->name('admin.feedback.destroy');//删除
            Route::post('/lock', 'FeedbackController@lock')->name('admin.feedback.lock');//锁定
            Route::post('/active', 'FeedbackController@active')->name('admin.feedback.active');//激活
        });

        //系统消息
        Route::group(['prefix' => 'message'], function(){
            Route::get ('/','MessageController@index')->name('admin.message.index');//首页
            Route::get ('/list','MessageController@list')->name('admin.message.list');//列表
            Route::get ('/publish','MessageController@publish')->name('admin.message.publish');//发布
            Route::post('/update', 'MessageController@update')->name('admin.message.update');//更新
            Route::post('/destroy', 'MessageController@destroy')->name('admin.message.destroy');//删除
        });
        //站内消息
        Route::group(['prefix' => 'mail'], function(){
            Route::get ('/','MailController@index')->name('admin.mail.index');//首页
            Route::get ('/list','MailController@list')->name('admin.mail.list');//列表
            Route::post('/destroy', 'MailController@destroy')->name('admin.mail.destroy');//删除
        });

        //文章
        Route::group(['prefix' => 'article'], function(){
            Route::get ('/','ArticleController@index')->name('admin.article.index');//首页
            Route::get ('/list','ArticleController@list')->name('admin.article.list');//列表
            Route::get ('/edit','ArticleController@edit')->name('admin.article.edit');//编辑（详情）
            Route::post('/update', 'ArticleController@update')->name('admin.article.update');//更新
            Route::post('/destroy', 'ArticleController@destroy')->name('admin.article.destroy');//删除
            Route::post('/lock', 'ArticleController@lock')->name('admin.article.lock');//拒绝
            Route::post('/active', 'ArticleController@active')->name('admin.article.active');//通过
        });
        //文档分类
        Route::group(['prefix' => 'word-category'], function(){
            Route::get ('/','WordCategoryController@index')->name('admin.wcate.index');//首页
            Route::get ('/list','WordCategoryController@list')->name('admin.wcate.list');//列表
            Route::post('/update', 'WordCategoryController@update')->name('admin.wcate.update');//更新
            Route::post('/destroy', 'WordCategoryController@destroy')->name('admin.wcate.destroy');//删除
        });
        //文档
        Route::group(['prefix' => 'word'], function(){
            Route::get ('/','WordController@index')->name('admin.word.index');//首页
            Route::get ('/list','WordController@list')->name('admin.word.list');//列表
            Route::get ('/edit','WordController@edit')->name('admin.word.edit');//编辑（详情）
            Route::post('/update', 'WordController@update')->name('admin.word.update');//更新
            Route::post('/destroy', 'WordController@destroy')->name('admin.word.destroy');//删除
            Route::post('/lock', 'WordController@lock')->name('admin.word.lock');//锁定
            Route::post('/active', 'WordController@active')->name('admin.word.active');//激活
        });
        //帮助中心分类
        Route::group(['prefix' => 'help-category'], function(){
            Route::get ('/','HelpCategoryController@index')->name('admin.hcate.index');//首页
            Route::get ('/list','HelpCategoryController@list')->name('admin.hcate.list');//列表
            Route::post('/update', 'HelpCategoryController@update')->name('admin.hcate.update');//更新
            Route::post('/destroy', 'HelpCategoryController@destroy')->name('admin.hcate.destroy');//删除
        });
        //帮助中心
        Route::group(['prefix' => 'help'], function(){
            Route::get ('/','HelpController@index')->name('admin.help.index');//首页
            Route::get ('/list','HelpController@list')->name('admin.help.list');//列表
            Route::get ('/edit','HelpController@edit')->name('admin.help.edit');//编辑
            Route::post('/update', 'HelpController@update')->name('admin.help.update');//更新
            Route::post('/destroy', 'HelpController@destroy')->name('admin.help.destroy');//删除
        });
        //友情链接
        Route::group(['prefix' => 'friend'], function(){
            Route::get ('/','FriendController@index')->name('admin.friend.index');//首页
            Route::get ('/list','FriendController@list')->name('admin.friend.list');//列表
            Route::post('/update', 'FriendController@update')->name('admin.friend.update');//更新
            Route::post('/destroy', 'FriendController@destroy')->name('admin.friend.destroy');//删除
            Route::post('/lock', 'FriendController@lock')->name('admin.friend.lock');//锁定
            Route::post('/active', 'FriendController@active')->name('admin.friend.active');//激活
        });

        //店铺列表
        Route::group(['prefix' => 'store'], function(){
            Route::get ('/','StoreController@index')->name('admin.store.index');//首页
            Route::get ('/list','StoreController@list')->name('admin.store.list');//列表
            Route::get ('/edit','StoreController@edit')->name('admin.store.edit');//编辑（详情）
            Route::get ('/detail','StoreController@detail')->name('admin.store.detail');//统计（详情）
            Route::post('/update', 'StoreController@update')->name('admin.store.update');//更新
            Route::post('/destroy', 'StoreController@destroy')->name('admin.store.destroy');//删除
            Route::post('/lock', 'StoreController@lock')->name('admin.store.lock');//锁定
            Route::post('/close', 'StoreController@close')->name('admin.store.close');//关店
            Route::post('/active', 'StoreController@active')->name('admin.store.active');//激活
            Route::get ('/exports','StoreController@exports')->name('admin.store.exports');//导出
        });
        //店铺评价
        Route::group(['prefix' => 'store-evaluate'], function(){
            Route::get ('/','StoreEvaluateController@index')->name('admin.sevaluate.index');//首页
            Route::get ('/list','StoreEvaluateController@list')->name('admin.sevaluate.list');//列表
            Route::get('/detail', 'StoreEvaluateController@detail')->name('admin.sevaluate.detail');//查看
            Route::post('/status', 'StoreEvaluateController@status')->name('admin.sevaluate.status');//改变状态
            Route::post('/destroy', 'StoreEvaluateController@destroy')->name('admin.sevaluate.destroy');//删除
        });

        //活动分类
        Route::group(['prefix' => 'activity-category'], function(){
            Route::get ('/','ActivityCategoryController@index')->name('admin.actcate.index');//首页
            Route::get ('/list','ActivityCategoryController@list')->name('admin.actcate.list');//列表
            Route::post('/update', 'ActivityCategoryController@update')->name('admin.actcate.update');//更新
            Route::post('/destroy', 'ActivityCategoryController@destroy')->name('admin.actcate.destroy');//删除
        });
        //活动列表
        Route::group(['prefix' => 'activity'], function(){
            Route::get ('/','ActivityController@index')->name('admin.activity.index');//首页
            Route::get ('/list','ActivityController@list')->name('admin.activity.list');//列表
            Route::get ('/edit','ActivityController@edit')->name('admin.activity.edit');//编辑（详情）
            Route::post('/update', 'ActivityController@update')->name('admin.activity.update');//更新
            Route::post('/destroy', 'ActivityController@destroy')->name('admin.activity.destroy');//删除
            Route::post('/lock', 'ActivityController@lock')->name('admin.activity.lock');//锁定
            Route::post('/active', 'ActivityController@active')->name('admin.activity.active');//激活
            Route::post('/cancel', 'ActivityController@cancel')->name('admin.activity.cancel');//激活
        });
        //报名记录
        Route::group(['prefix' => 'sign-up'], function(){
            Route::get ('/','SignUpController@index')->name('admin.sign.index');//首页
            Route::get ('/list','SignUpController@list')->name('admin.sign.list');//列表
            Route::post('/lock', 'SignUpController@lock')->name('admin.sign.lock');//锁定
            Route::post('/active', 'SignUpController@active')->name('admin.sign.active');//激活
            Route::post('/destroy', 'SignUpController@destroy')->name('admin.sign.destroy');//删除
            Route::get('/exports', 'SignUpController@exports')->name('admin.sign.exports');//导出
        });

        //需求列表
        Route::group(['prefix' => 'demand'], function(){
            Route::get ('/','DemandController@index')->name('admin.demand.index');//首页
            Route::get ('/list','DemandController@list')->name('admin.demand.list');//列表
            Route::get ('/edit','DemandController@edit')->name('admin.demand.edit');//编辑（详情）
            Route::post('/update', 'DemandController@update')->name('admin.demand.update');//更新
            Route::post('/destroy', 'DemandController@destroy')->name('admin.demand.destroy');//删除
            Route::post('/active', 'DemandController@active')->name('admin.demand.active');//激活
            Route::post('/lock', 'DemandController@lock')->name('admin.demand.lock');//拒绝
            Route::post('/close', 'DemandController@close')->name('admin.demand.close');//下架
            Route::get('/userlist', 'DemandController@user_list')->name('admin.demand.user_list');//参与投标供应商
            Route::post('/storeupdate', 'DemandController@store_update')->name('admin.demand.store_update');//指定投标供应商
            Route::get ('/exports','DemandController@exports')->name('admin.demand.exports');//导出
        });

        //快速发布需求列表
        Route::group(['prefix' => 'quick-demand'], function(){
            Route::get ('/','QuickDemandsController@index')->name('admin.quick_demand.index');//首页
            Route::get ('/list','QuickDemandsController@list')->name('admin.quick_demand.list');//列表
            Route::post('/butt', 'QuickDemandsController@butt')->name('admin.quick_demand.butt');//对接
            Route::post('/butt1', 'QuickDemandsController@butt1')->name('admin.quick_demand.butt1');//发布
            Route::post('/destroy', 'QuickDemandsController@destroy')->name('admin.quick_demand.destroy');//删除
        });

        //通话记录列表
        Route::group(['prefix' => 'phone-map'], function(){
            Route::get ('/','PhoneMapController@index')->name('admin.phone.index');//首页
            Route::get ('/list','PhoneMapController@list')->name('admin.phone.list');//列表
            Route::post('/destroy', 'PhoneMapController@destroy')->name('admin.phone.destroy');//删除
            Route::get ('/exports','PhoneMapController@exports')->name('admin.phone.exports');//导出
        });

        //投标记录
        Route::group(['prefix' => 'bid'], function(){
            Route::get ('/','BidLogController@index')->name('admin.bid.index');//首页
            Route::get ('/list','BidLogController@list')->name('admin.bid.list');//列表
            Route::post('/active', 'BidLogController@active')->name('admin.bid.active');//激活
            Route::post('/pay', 'BidLogController@pay')->name('admin.bid.pay');//完成订单
            Route::post('/destroy', 'BidLogController@destroy')->name('admin.bid.destroy');//删除
        });

        //提现管理
        Route::group(['prefix' => 'cash-out'], function(){
            Route::get ('/','CashOutController@index')->name('admin.cash.index');//首页
            Route::get ('/list','CashOutController@list')->name('admin.cash.list');//列表
            Route::get('/edit', 'CashOutController@edit')->name('admin.cash.edit');//查看
            Route::post('/active', 'CashOutController@active')->name('admin.cash.active');//审核通过
            Route::post('/lock', 'CashOutController@lock')->name('admin.cash.lock');//审核失败
            Route::post('/destroy', 'CashOutController@destroy')->name('admin.cash.destroy');//删除
            Route::get('/exports', 'CashOutController@exports')->name('admin.cash.exports');//导出
        });
        //保证金退还
        Route::group(['prefix' => 'deposit-back'], function(){
            Route::get ('/','BondReturnLogsController@index')->name('admin.bond.index');//首页
            Route::get ('/list','BondReturnLogsController@list')->name('admin.bond.list');//列表
            Route::get('/edit', 'BondReturnLogsController@edit')->name('admin.bond.edit');//查看
            Route::post('/active', 'BondReturnLogsController@active')->name('admin.bond.active');//审核
            Route::post('/destroy', 'BondReturnLogsController@destroy')->name('admin.bond.destroy');//删除
            Route::get('/exports', 'BondReturnLogsController@exports')->name('admin.bond.exports');//导出
        });
        //积分记录
        Route::group(['prefix' => 'integral'], function(){
            Route::get ('/','IntegralController@index')->name('admin.integral.index');//首页
            Route::get ('/list','IntegralController@list')->name('admin.integral.list');//列表
        });
        //余额记录
        Route::group(['prefix' => 'surplus'], function(){
            Route::get ('/','SurplusController@index')->name('admin.surplus.index');//首页
            Route::get ('/list','SurplusController@list')->name('admin.surplus.list');//列表
        });
        //收益记录
        Route::group(['prefix' => 'profit'], function(){
            Route::get ('/','ProfitController@index')->name('admin.profit.index');//首页
            Route::get ('/list','ProfitController@list')->name('admin.profit.list');//列表
            Route::get ('/exports','ProfitController@exports')->name('admin.profit.exports');//导出
        });
        //订单管理
        Route::group(['prefix' => 'order'], function(){
            Route::get ('/','OrderController@index')->name('admin.order.index');//首页
            Route::get ('/list','OrderController@list')->name('admin.order.list');//列表
            Route::get('/detail', 'OrderController@detail')->name('admin.order.detail');//查看
            Route::post('/delivery', 'OrderController@delivery')->name('admin.order.delivery');//发货
            Route::post('/destroy', 'OrderController@destroy')->name('admin.order.destroy');//删除
            Route::get('/exports', 'OrderController@exports')->name('admin.order.exports');//导出
        });
        //商品评价
        Route::group(['prefix' => 'evaluate'], function(){
            Route::get ('/','EvaluateController@index')->name('admin.evaluate.index');//首页
            Route::get ('/list','EvaluateController@list')->name('admin.evaluate.list');//列表
            Route::get('/detail', 'EvaluateController@detail')->name('admin.evaluate.detail');//查看
            Route::post('/status', 'EvaluateController@status')->name('admin.evaluate.status');//改变状态
            Route::post('/destroy', 'EvaluateController@destroy')->name('admin.evaluate.destroy');//删除
        });
        //售后管理
        Route::group(['prefix' => 'aftersale'], function(){
            Route::get ('/','AfterSaleController@index')->name('admin.aftersale.index');//首页
            Route::get ('/list','AfterSaleController@list')->name('admin.aftersale.list');//列表
            Route::get('/detail', 'AfterSaleController@detail')->name('admin.aftersale.detail');//查看
            Route::post('/destroy', 'AfterSaleController@destroy')->name('admin.aftersale.destroy');//删除
        });

        //商品分类
        Route::group(['prefix' => 'goods-category'], function(){
            Route::get ('/','GoodsCategoryController@index')->name('admin.goodscate.index');//首页
            Route::get ('/list','GoodsCategoryController@list')->name('admin.goodscate.list');//列表
            Route::post('/update', 'GoodsCategoryController@update')->name('admin.goodscate.update');//更新
            Route::post('/destroy', 'GoodsCategoryController@destroy')->name('admin.goodscate.destroy');//删除
        });
        //供应商商品列表
        Route::group(['prefix' => 'bus-goods'], function(){
            Route::get ('/busindex','GoodsController@busIndex')->name('admin.busgoods.busIndex');//供应商商品首页
            Route::get ('/buslist','GoodsController@busList')->name('admin.busgoods.busList');//供应商商品列表
            Route::post ('/hot1','GoodsController@hot1')->name('admin.busgoods.hot1');//供应商商品热门
            Route::post ('/hot2','GoodsController@hot2')->name('admin.busgoods.hot2');//供应商商品非热门
            Route::get ('/integralindex','GoodsController@integralIndex')->name('admin.busgoods.integralIndex');//积分商品页面
            Route::get ('/integrallist','GoodsController@integralList')->name('admin.busgoods.integralList');//积分商品列表
            Route::get ('/integraledit','GoodsController@integralEdit')->name('admin.busgoods.integralEdit');//积分商品编辑（详情）
            Route::post('/integralupdate', 'GoodsController@integralUpdate')->name('admin.busgoods.integralUpdate');//积分商品更新
            Route::post('/destroy', 'GoodsController@destroy')->name('admin.busgoods.destroy');//删除
            Route::post('/active', 'GoodsController@active')->name('admin.busgoods.active');//上架
            Route::post('/close', 'GoodsController@close')->name('admin.busgoods.close');//下架
            Route::post('/lock', 'GoodsController@lock')->name('admin.busgoods.lock');//锁定
        });

    });
});